package com.hxd.otc.module.my.bean;

import android.text.TextUtils;

import com.hxd.otc.utils.StringUtil;

import java.io.Serializable;

/**
 * Created by lzy on 2018/8/15 0015.
 * description ${融云用户信息}
 */
public class RongUserInfoBean implements Serializable {

    private String userId;
    private String username;
    private String mobile;
    private String createTime;
    private String token;
    private String tag;
    private String realName;
    private String mail;
    private String nickName;
    private String cardLevel;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getTag() {
        return tag;
    }

    public void setTag(String tag) {
        this.tag = tag;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getMail() {
        return mail;
    }

    public void setMail(String mail) {
        this.mail = mail;
    }

    public String getNickName() {
        if (!TextUtils.isEmpty(nickName)) return nickName;
        if (!TextUtils.isEmpty(realName)) return realName;
        if (!TextUtils.isEmpty(mobile)) return mobile;
        if (!TextUtils.isEmpty(mail)) return mail;
        return StringUtil.emptyIfNull(userId);
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getCardLevel() {
        return cardLevel;
    }

    public void setCardLevel(String cardLevel) {
        this.cardLevel = cardLevel;
    }

    @Override
    public String toString() {
        return "RongUserInfoBean{" +
                "userId='" + userId + '\'' +
                ", username='" + username + '\'' +
                ", mobile='" + mobile + '\'' +
                ", createTime='" + createTime + '\'' +
                ", token='" + token + '\'' +
                ", tag='" + tag + '\'' +
                ", realName='" + realName + '\'' +
                ", mail='" + mail + '\'' +
                ", nickName='" + nickName + '\'' +
                ", cardLevel='" + cardLevel + '\'' +
                '}';
    }
}
